//
//  NPC.h
//  gong
//
//  Created by echo on 14-1-11.
//  Copyright (c) 2014年 echo. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum
{
    ShowAtTheLeft1 = 0,
    ShowAtTheLeft2,
    ShowInTheMiddle,
    ShowAtTheRight1,
    ShowAtTheRight2,
    ShowAtTheLeft,
    ShowAtTheRight
} ShowPosition;

@interface NPC : NSObject
{
    __weak UIView *_containerView;
    NSDictionary *_avatarDictionary;
    NSString *_currentNPCImageName;
    NSString *_steetImageName;
    NSArray *_randomScriptArray;
}

@property (nonatomic, copy) NSString *name;
@property (nonatomic, weak) UIView *containerView;
@property (nonatomic, assign) ShowPosition showPosition;
@property (nonatomic, assign) BOOL canSelect;
@property (nonatomic, copy) void (^selectTargetAction) ();
@property (nonatomic, assign) BOOL isShowInStreet;
@property (nonatomic, strong) UIImageView *currentAvatar;
@property (nonatomic, strong) UIImageView *streetAvatar;

- (id)initWithContainer:(UIView*)containerView info:(NSDictionary*)info;
//- (id)init:(UIView*)containerView;
- (void)initDefault;

- (void)createAvatar;
- (void)createStreetAvatar;
- (NSString*)getRandomTalk;

- (void)show;
- (void)show:(ShowPosition)showPosition;
- (void)showWithDescripter:(NSString*)positionDescriptor;
- (void)showInStreet:(UIView*)streetView withPosition:(CGPoint)position;

- (void)talk:(NSString*)text;

- (void)leave;
- (void)moveTo:(NSString*)positionDescriptor;

@end
